
<%@ page import="Answer" %>
<html>
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'answer.label', default: 'Answer')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <div class="nav">
	<span class="menuButton"><g:link class="list" action="stat">多选题统计结果</g:link></span>
	<span class="menuButton"><g:link class="list" action="bytext">问答题汇总</g:link></span>
  </div>
  <div class="body">
	<g:if test="${flash.message}">
	  <div class="message">${flash.message}</div>
	</g:if>
	<div class="list">
	  <g:each in="${answerInstanceList}" var="rsltUserAnswers">
	  <g:set var="q" value="${Question.findById(rsltUserAnswers.key)}"/>
		<table>
		  <thead>
			<tr>
			  <th colspan="2">${q.id}. ${q.content}</th>
			</tr>
		  </thead>
		  <tbody>
		  <g:each in="${rsltUserAnswers.value}" status="j" var="rsltSubAnswers">
			<tr class="${(j % 2) == 0 ? 'odd' : 'even'}">
			  <td>${rsltSubAnswers.key}</td>
			  <td style="border-left:0px ">
				<table style="border: 0px; border-left-width: 0px">
				  <tr>
					<td style="padding: 4px 4px">
					  <g:each in="${rsltSubAnswers.value}" var="answerTextItem">
						<div class="answerText">${answerTextItem}</div>
					  </g:each>
	  				</td>
				  </tr>
				  <tr>
				  </tr>
				</table>
			</td>
			</tr>
	  </g:each>
	  </tbody>
	  </table>
	  <br/>
	  </g:each>
	</div>

  </div>
</body>
</html>
